extensibility

Create a Document


To create a new XML document, choose Create Document from the Welcome window. 

Figure A - XML Instance Welcome Window

If  you are already working within XML Instance, you can create a new document via the File menu (File...New...New XML Document) or the Toolbar (Figure B.)

Figure B - New Button on Toolbar

When you select to create a new document, XML Instance opens an untitled document, with a root element called root.  If you are creating a document from scratch, you would begin by renaming root to the name of the root element for your document and continue inserting elements and attributes as well as element content and attribute values.   

If you have a schema upon which to base your new document, your first step should be to select the schema via the "Set Schema" button on the main toolbar (Figure C). 

 

Figure C -  Set Schema Button on Toolbar

 

You will then be prompted to locate the schema which you want to use (Fig. D).

 

Figure D -  Apply Schema Window

Upon selecting your schema, XML Instance will import all of the required elements and attributes into the Tag area and will import any default attribute values into the Edit Area.  Elements and attributes defined by the schema as optional will be available as choices in the Tag Area drop down menus and the Factory Bar. (See Inserting Elements and Attributes.)

Hint:  XI provides a number of shortcuts to facilitate the setting of frequently used schemas.  A right click on the Create Document icon from the Welcome Window provides a drop down menu of schemas recently used to create new XML documents (Figure E). Select a schema on this menu to have it automatically set for the new document.   

Figure E - Recently used schemas

A right click on the Set Schema button on the Toolbar also provides the drop down menu of recently used schemas.  These schemas also appear as choices from the File menu (File menu...New).  

Copyright 2000 Extensibility, Inc.

Suite 250, 200 Franklin Street, Chapel Hill, North Carolina 27516